/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author hancing.com
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface DpYqrecord extends BasicModel<DpYqrecord> {
  yqr?: string; // 邀请账号
  byqr?: string; // 被邀请账号
  yqrname?: string; // 邀请人
  byqrname?: string; // 被邀请人名称
  qyj?: number; // 权益金
  qyjtitle?: string; // 权益金来源
}

export const dpYqrecordList = (params?: DpYqrecord | any) =>
  defHttp.get<DpYqrecord>({ url: adminPath + '/dp/yqrecord/dpYqrecord/list', params });

export const dpYqrecordListData = (params?: DpYqrecord | any) =>
  defHttp.post<Page<DpYqrecord>>({ url: adminPath + '/dp/yqrecord/dpYqrecord/listData', params });

export const dpYqrecordForm = (params?: DpYqrecord | any) =>
  defHttp.get<DpYqrecord>({ url: adminPath + '/dp/yqrecord/dpYqrecord/form', params });

export const dpYqrecordSave = (params?: any, data?: DpYqrecord | any) =>
  defHttp.postJson<DpYqrecord>({ url: adminPath + '/dp/yqrecord/dpYqrecord/save', params, data });

export const dpYqrecordDelete = (params?: DpYqrecord | any) =>
  defHttp.get<DpYqrecord>({ url: adminPath + '/dp/yqrecord/dpYqrecord/delete', params });
